// craco.config.js
module.exports = {
  webpack: {
    configure: (webpackConfig, { env, paths }) => {
      // 添加 Node.js 模块的 polyfill
      webpackConfig.resolve.fallback = {
        ...webpackConfig.resolve.fallback,
        querystring: require.resolve('querystring-es3')
      };
      
      return webpackConfig;
    }
  }
};